package com.foreknow.elmboot.mapper;

import com.foreknow.elmboot.po.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.sql.SQLException;

@Mapper
public interface UserMapper {
    @Select("select * from user where userId=#{userId} and password =#{password}")
    public User dgetUserByIdByPass(String userId, String password);
    @Select("select * from user where userId=#{userId}")
    public Integer dgetUserById(String userId);
    @Insert("insert into user(userId,password,userName,userSex) values(#{userId},#{password},#{userName},#{userSex})")
    public Integer dsaveUser(User user);
}
